import request from '@/utils/request'

export function getPermissionList () {
  return request({
    url: '/sys/permission',
    method: 'GET'
  })
}

export function addPermissionList (data) {
  return request({
    url: '/sys/permission',
    method: 'POST',
    data
  })
}

export function delPermissionList (id) {
  return request({
    url: '/sys/permission/' + id,
    method: 'DELETE'

  })
}

export function getPermissionDetail (id) {
  return request({
    url: '/sys/permission/' + id,
    method: 'GET'
  })
}

export function updatePermission (data) {
  return request({
    url: '/sys/permission/' + data.id,
    method: 'PUT',
    data
  })
}
